package sunwin.yois.web.common;

import org.springframework.stereotype.Component;

/**
 * Created by mt on 2015-8-29.
 */
@Component
public class R {                // 所有的URL   理解为常量
    public static final String Address = "南京";
    public static final String Baidu = "baidu_verify_8GoRkL14bh";

    public static final String YomUrl = "http://112.95.150.106:8081/";
    public static final String YoiUrl = "http://112.95.150.106/";

    public static final String Index = "default";
    public static final String Register = "register";
    public static final String ChangePassword = "changePassword";
    public static final String BindPhoneCheck = "phoneCheck";
    public static final String BindEmailCheck = "emailCheck";
    public static final String PhoneCheckNumber = "phoneCheckNumber";
    public static final String EmailCheckNumber = "emailCheckNumber";

    public static final String Configuration = "person-config";
    public static final String CheckCode = "check";
    public static final String AllCheckCode = "AllCheckCode";
    public static final String UpdatePersonInfo = "update-person-info";

    public static final String IsLogin = "IsLogin";
    public static final String Logout = "logout";
    public static final String Login = "yois.login";
    public static final String LoginCheck = "check.login";
    public static final String LoginError = "error.login";
    public static final String Seach = "seach";

    public static final String SubscribeIndex = "subscribe-index";
    public static final String SubscribeDetailed = "stadium-detailed";
    public static final String SubscribeStadium = "subscribe-stadium";
    public static final String GetValidStadium = "get-valid-stadium";
    public static final String GetTimesByDate = "get-times-by-date";
    public static final String GetDateBySid = "get-date-by-sid";
    public static final String GetTimesByDateWithSid = "get-times-by-date-with-sid";
    public static final String CancelSubscribe = "Cancel-Subscribe";
    public static final String CancelSubscribeTime = "Cancel-Subscribe-Time";
    public static final String CancelSubscribeBatch = "Cancel-Subscribe-Batch";

    public static final String MapIndex = "map-index";

    public static final String NewsIndex = "news-index";
    public static final String NewsDetailed = "news-detailed";

    public static final String ParkIndex = "park-index";
    public static final String ParkDetailed = "park-detailed";


    public static final String VideoIndex = "video";
    public static final String VideoDetailed = "video-detailed";


    /**
     * 获取 YOMS Url
     *
     * @return
     */


    public static String getYomUrl() {
        return YomUrl;
    }

    public static String getYoiUrl() {
        return YoiUrl;
    }

    public static String getLoginCheck() {
        return LoginCheck;
    }

    public static String getLogin() {
        return Login;
    }

    public static String getLogout() {
        return Logout;
    }

    public static String getLoginError() {
        return LoginError;
    }

    /*上面的get方法不需要追加.html后缀*/

    public static String getCancelSubscribe() {
        return getUrl(CancelSubscribe);
    }
    public static String getCancelSubscribeTime() {
        return getUrl(CancelSubscribeTime);
    }

    public static String getCancelSubscribeBatch(){return getUrl(CancelSubscribeBatch);}

    public static String getGetDateBySid() {
        return getUrl(GetDateBySid);
    }

    public static String getGetTimesByDateWithSid() {
        return getUrl(GetTimesByDateWithSid);
    }

    public static String getSeach() {
        return getUrl(Seach);
    }

    public static String getUpdatePersonInfo() {
        return getUrl(UpdatePersonInfo);
    }

    public static String getIsLogin() {
        return IsLogin;
    }

    public static String getChangePassword() {
        return getUrl(ChangePassword);
    }

    public static String getBindPhoneCheck() {
        return getUrl(BindPhoneCheck);
    }

    public static String getBindEmailCheck() {
        return getUrl(BindEmailCheck);
    }

    public static String getPhoneCheckNumber() {
        return getUrl(PhoneCheckNumber);
    }

    public static String getEmailCheckNumber() {
        return getUrl(EmailCheckNumber);
    }

    public static String getAllCheckCode() {
        return getUrl(AllCheckCode);
    }

    public static String getCheckCode() {
        return getUrl(CheckCode);
    }

    public static String getConfiguration() {
        return getUrl(Configuration);
    }

    public static String getRegister() {
        return getUrl(Register);
    }

    public static String getMapIndex() {
        return getUrl(MapIndex);
    }

    public static String getGetTimesByDate() {
        return getUrl(GetTimesByDate);
    }

    public static String getSubscribeDetailed() {
        return getUrl(SubscribeDetailed);
    }

    public static String getSubscribeStadium() {
        return getUrl(SubscribeStadium);
    }

    public static String getGetValidStadium() {
        return getUrl(GetValidStadium);
    }

    public static String getVideoIndex() {
        return getUrl(VideoIndex);
    }

    public static String getVideoDetailed() {
        return getUrl(VideoDetailed);
    }

    public static String getNewsDetailed() {
        return getUrl(NewsDetailed);
    }

    public static String getNewsIndex() {
        return getUrl(NewsIndex);
    }

    public static String getParkIndex() {
        return getUrl(ParkIndex);
    }

    public static String getParkDetailed() {
        return getUrl(ParkDetailed);
    }

    public static String getSubscribeIndex() {
        return getUrl(SubscribeIndex);
    }

    public static String getIndex() {
        return getUrl(Index);
    }

    private static String getUrl(String urlName) {
        return urlName + ".html";
    }
}
